<template>
  <div>
    <input type="text" id="ipt" ref="ipt" />
    <button @click="handleFocus" ref="btn">点击聚焦</button>
    <alertFather ref="alert"></alertFather>
    <button @click="handleShow">点击弹框</button>
  </div>
</template>

<script>
import alertFather from "./components/alert.vue";
export default {
  components: {
    alertFather,
  },
  methods: {
    handleFocus() {
      this.$refs.ipt.focus();
    },
    handleShow() {
      console.log(this.$refs);
      this.$refs.alert.handleAlert("我是你爹");
    },
  },
};
</script>

<style>
</style>